<include file="Public/header" />
<title>添加账册</title>
</head>
<body>
<div class="pd-20">
<form class="" name="form" id="form" action="__URL__/index/" method="get">
	<table class="table table-border table-bordered table-bg">
		<input type="hidden" name="id" class="input-text" value="<{$detail.id}>">
		<tbody>
			<tr class="text-c">
				<td width="15%" class="text-r" style="background-color:#f5f5f5">目的地</td>
				<td class="text-l" width="35%">
					<input type="hidden" name="id" class="input-text" value="<{:I('id')}>" >
					<!-- <input type="text" name="area" class="input-text" value="<{$detail['area']}>" > -->
					<select name="area" class="select input-text" style="width:250px;float:left;margin-right:5px;">
						<option value="0">---请选择---</option>
						<foreach name="province_list" item="vo">
							<option value="<{$vo['fullName']}>"<if condition="$vo['fullName'] eq $detail['area']">selected</if> ><{$vo.fullName}></option>
						</foreach>
					</select>
				</td>
				<td width="15%" class="text-r" style="background-color:#f5f5f5">首重单位数量(kg)</td>
				<td class="text-l">
					<input type="text" name="first_weight" class="input-text" value="<{$detail['first_weight']}>">
				</td>				
			</tr>
			<tr class="text-c">
				<td width="15%" class="text-r" style="background-color:#f5f5f5">首重单位价格</td>
				<td class="text-l" width="35%">
					<input type="text" name="first_price" class="input-text" value="<{$detail['first_price']}>" >
				</td>
				<td width="15%" class="text-r" style="background-color:#f5f5f5">续重单位数量(kg)</td>
				<td class="text-l">
					<input type="text" name="second_weight" class="input-text" value="<{$detail['second_weight']}>" >
				</td>				
			</tr>
			<tr class="text-c">
				<td width="15%" class="text-r" style="background-color:#f5f5f5">续重单位价格</td>
				<td class="text-l" width="35%">
					<input type="text" name="second_price" class="input-text" value="<{$detail['second_price']}>" >
				</td>
				<td width="15%" class="text-r" style="background-color:#f5f5f5"></td>
				<td class="text-l">
				</td>				
			</tr>
		</tbody>
	</table>
	<input type="button" class="btn btn-primary radius mt" id="b_add" value="更新">
</form>
</div>
<script type="text/javascript">
    $(function(){
		/*保存计划入库单数据*/
        $("#b_add").click(function(){
			$.ajax({
                type: 'POST',
                data: $("#form").serialize(),
                url: "<{:U('edit_emsfee')}>",
                success:function(data){
                    layer.msg(data.message,function(){
						if(data.status==0){
							return false;
						}
						parent.window.location.href =parent.window.location.href;
					});
                }
            })
            
        });

    })
</script>
</body>
</html>